<?php

class DbMonitorModule extends CWebModule {

	public $defaultController = 'default';
	
	private $_assetsUrl;
	
	public function getAppName() {
		return 'Database Monitor For MySQL';
	}
	
	public function getVersion() {
		return '1.0';
	}
	
	protected function init() {
		$this->setImport(array(
			'dbMonitor.models.*',
			'dbMonitor.models.forms.*',
			'dbMonitor.helpers.*',
			'dbMonitor.components.*',
		));
	}
	
	/**
	 * @return string the base URL that contains all published asset files of gii.
	 */
	public function getAssetsUrl()
	{
		if($this->_assetsUrl===null)
			$this->_assetsUrl=Yii::app()
				->getAssetManager()
				->publish(Yii::getPathOfAlias('dbMonitor.assets'), false, -1, true);
		return $this->_assetsUrl;
	}

	/**
	 * @param string $value the base URL that contains all published asset files of gii.
	 */
	public function setAssetsUrl($value)
	{
		$this->_assetsUrl=$value;
	}
}

?>
